package com.pig4cloud.pig.homecenter.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.pig4cloud.pig.homecenter.enums.TrueFalse;
import com.pig4cloud.pig.homecenter.json.CustomHassDateDeserializer;
import com.pig4cloud.pig.homecenter.json.CustomTrueFalseDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.IOException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * 区域数据
 *
 * @author pig
 * @date 2024-12-20 10:27:36
 */
@Data
@TableName("hass_area_registry")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "区域数据")
public class HassAreaRegistryEntity extends Model<HassAreaRegistryEntity> {

 
	/**
	* id
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="id")
    private Long id;

	/**
	* 区域编号
	*/
	@JsonAlias({"area_id", "areaId"})
    @Schema(description="区域编号")
    private String areaId;

	/**
	* 楼层编号
	*/
	@JsonAlias({"floor_id", "floorId"})
    @Schema(description="楼层编号")
    private String floorId;

	/**
	* 图标
	*/
    @Schema(description="图标")
    private String icon;

	/**
	* 自定义图标
	*/
    @Schema(description="自定义图标")
    private String customIcon;

	/**
	* 名称
	*/
    @Schema(description="名称")
    private String name;

	/**
	* 自定义名称
	*/
    @Schema(description="自定义名称")
    private String customName;

	/**
	* 创建时间
	*/
	@JsonAlias({"created_at", "createAt"})
	@JsonDeserialize(using = CustomHassDateDeserializer.class)
    @Schema(description="创建时间")
    private LocalDateTime createAt;

	/**
	* hass更新时间
	*/
	@JsonAlias({"modified_at", "modifiedAt"})
	@JsonDeserialize(using = CustomHassDateDeserializer.class)
    @Schema(description="hass更新时间")
    private LocalDateTime modifiedAt;

	/**
	* 归属用户
	*/
    @Schema(description="归属用户")
    private Long userId;

	/**
	* 平台更新时间
	*/
	@TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description="平台更新时间")
    private LocalDateTime updateTime;

	@Schema(description="是否可见")
	private Boolean visible;


}
